package behavior.state.versionTwo;

import behavior.state.enums.TimeQuantum;
import lombok.extern.slf4j.Slf4j;

/**
 * @author huhaiqiang
 * @version V1.0
 * @description 下班吃午饭状态类
 * @date 2018/12/21 10:47
 */
@Slf4j
public class HaveLunchAfterWork implements State {

    public void doSth(PersonB personB) {
        if (personB.getHour() == TimeQuantum.HOUR_TWO.getHour()) {
            log.info("现在是中午12点，下班吃午饭啦！");
        } else {
            personB.setState(new OnTheMiddleShift());
            personB.doSth();
        }
    }
}
